6dofimu26 2.2.1
Loading...
Searching...
No Matches
6DOF IMU 26 Click Driver

API for configuring and manipulating 6DOF IMU 26 Click driver. More...

Topics

 6DOF IMU 26 Registers List
 List of registers of 6DOF IMU 26 Click driver.
 6DOF IMU 26 Registers Settings
 Settings for registers of 6DOF IMU 26 Click driver.
 6DOF IMU 26 MikroBUS Map
 MikroBUS pin mapping of 6DOF IMU 26 Click driver.

Functions

void c6dofimu26_cfg_setup (c6dofimu26_cfg_t *cfg)
 6DOF IMU 26 configuration object setup function.
err_t c6dofimu26_init (c6dofimu26_t *ctx, c6dofimu26_cfg_t *cfg)
 6DOF IMU 26 initialization function.
err_t c6dofimu26_default_cfg (c6dofimu26_t *ctx)
 6DOF IMU 26 default configuration function.
err_t c6dofimu26_write_reg (c6dofimu26_t *ctx, uint8_t reg, uint32_t data_in)
 6DOF IMU 26 write register function.
err_t c6dofimu26_read_reg (c6dofimu26_t *ctx, uint8_t reg, uint32_t *data_out)
 6DOF IMU 26 read register function.
void c6dofimu26_set_rst_pin (c6dofimu26_t *ctx, uint8_t state)
 6DOF IMU 26 set reset pin function.
uint8_t c6dofimu26_get_dry_pin (c6dofimu26_t *ctx)
 6DOF IMU 26 get data ready pin function.
void c6dofimu26_reset_device (c6dofimu26_t *ctx)
 6DOF IMU 26 reset device function.
err_t c6dofimu26_check_communication (c6dofimu26_t *ctx)
 6DOF IMU 26 check communication function.
err_t c6dofimu26_get_accel (c6dofimu26_t *ctx, c6dofimu26_axes_t *accel)
 6DOF IMU 26 get accelerometer data function.
err_t c6dofimu26_get_gyro (c6dofimu26_t *ctx, c6dofimu26_axes_t *gyro)
 6DOF IMU 26 get gyroscope data function.
err_t c6dofimu26_get_temp (c6dofimu26_t *ctx, float *temp)
 6DOF IMU 26 get temperature function.
err_t c6dofimu26_get_data (c6dofimu26_t *ctx, c6dofimu26_data_t *data_out)
 6DOF IMU 26 get all sensor data function.

Detailed Description

API for configuring and manipulating 6DOF IMU 26 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ c6dofimu26_cfg_setup()

void c6dofimu26_cfg_setup ( c6dofimu26_cfg_t * cfg)

6DOF IMU 26 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See c6dofimu26_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ c6dofimu26_check_communication()

err_t c6dofimu26_check_communication ( c6dofimu26_t * ctx)

6DOF IMU 26 check communication function.

This function checks the communication by writing and reading the system test register.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c6dofimu26_default_cfg()

err_t c6dofimu26_default_cfg ( c6dofimu26_t * ctx)

6DOF IMU 26 default configuration function.

This function executes a default configuration of 6DOF IMU 26 Click board.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ c6dofimu26_get_accel()

err_t c6dofimu26_get_accel ( c6dofimu26_t * ctx,
c6dofimu26_axes_t * accel )

6DOF IMU 26 get accelerometer data function.

This function reads the accelerometer X, Y, and Z axis values.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[out]accel: Pointer to store accelerometer values in g.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c6dofimu26_get_data()

err_t c6dofimu26_get_data ( c6dofimu26_t * ctx,
c6dofimu26_data_t * data_out )

6DOF IMU 26 get all sensor data function.

This function reads the accelerometer, gyroscope, and temperature data.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[out]data_out: Pointer to store sensor data.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c6dofimu26_get_dry_pin()

uint8_t c6dofimu26_get_dry_pin ( c6dofimu26_t * ctx)

6DOF IMU 26 get data ready pin function.

This function reads the logic state of the data ready (DRY) pin.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ c6dofimu26_get_gyro()

err_t c6dofimu26_get_gyro ( c6dofimu26_t * ctx,
c6dofimu26_axes_t * gyro )

6DOF IMU 26 get gyroscope data function.

This function reads the gyroscope X, Y, and Z axis values.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[out]gyro: Pointer to store gyroscope values in dps.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c6dofimu26_get_temp()

err_t c6dofimu26_get_temp ( c6dofimu26_t * ctx,
float * temp )

6DOF IMU 26 get temperature function.

This function reads the temperature sensor value.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[out]temp: Pointer to store temperature in degrees Celsius.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c6dofimu26_init()

err_t c6dofimu26_init ( c6dofimu26_t * ctx,
c6dofimu26_cfg_t * cfg )

6DOF IMU 26 initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See c6dofimu26_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c6dofimu26_read_reg()

err_t c6dofimu26_read_reg ( c6dofimu26_t * ctx,
uint8_t reg,
uint32_t * data_out )

6DOF IMU 26 read register function.

This function reads data from a specified register of the 6DOF IMU 26 device.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Pointer to store the read data.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c6dofimu26_reset_device()

void c6dofimu26_reset_device ( c6dofimu26_t * ctx)

6DOF IMU 26 reset device function.

This function resets the device by toggling the reset pin logic state.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ c6dofimu26_set_rst_pin()

void c6dofimu26_set_rst_pin ( c6dofimu26_t * ctx,
uint8_t state )

6DOF IMU 26 set reset pin function.

This function sets the reset pin logic state.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ c6dofimu26_write_reg()

err_t c6dofimu26_write_reg ( c6dofimu26_t * ctx,
uint8_t reg,
uint32_t data_in )

6DOF IMU 26 write register function.

This function writes data to a specified register of the 6DOF IMU 26 device.

Parameters
[in]ctx: Click context object. See c6dofimu26_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.